package net.scala.chapter2.c;

/**
 * @author Barudisshu
 */
public class Ordinal {

    public static void main(String[] args) {
        ordinal(Integer.parseInt(args[0]));
    }

    public static void ordinal(int number) {
        switch (number) {
            case 1:
                System.out.println("1st");
                break;
            case 2:
                System.out.println("2st");
                break;
            case 3:
                System.out.println("3st");
                break;
            case 4:
                System.out.println("4st");
                break;
            case 5:
                System.out.println("5st");
                break;
            case 6:
                System.out.println("6st");
                break;
            case 7:
                System.out.println("7st");
                break;
            case 8:
                System.out.println("8st");
                break;
            case 9:
                System.out.println("9st");
                break;
            case 10:
                System.out.println("10st");
                break;
            default:
                System.out.println("Cannot do beyond 10");
        }
    }
}
